Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: snapshot tests for storage_types contract dryrun results #470

Merged
merged 5 commits into from
May 19, 2023

Conversation

peetzweg
Copy link
Collaborator

@peetzweg peetzweg commented Apr 27, 2023

adds snapshot testing of the dryrun results of the functions from the "storage_types" contract.
Contract source can be found here: use-ink/ink#1762

Screenshot 2023-04-27 at 15 47 15

@netlify
Copy link

netlify bot commented Apr 27, 2023

Deploy Preview for contracts-ui ready!

Name Link
🔨 Latest commit 30a806c
🔍 Latest deploy log https://app.netlify.com/sites/contracts-ui/deploys/645a4eeb394333000891d0d1
😎 Deploy Preview https://deploy-preview-470--contracts-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@peetzweg
Copy link
Collaborator Author

peetzweg commented May 4, 2023

@statictype statictype changed the title feat: snapshot tests for storage_types contract dryrun results test: snapshot tests for storage_types contract dryrun results May 8, 2023
@statictype
Copy link
Contributor

The decoded values for Option and Option look wrong to me, wdyt @statictype

It's correct actually, the Option returns nothing in the Some branch

@peetzweg
Copy link
Collaborator Author

peetzweg commented May 9, 2023

The decoded values for Option and Option look wrong to me, wdyt @statictype

It's correct actually, the Option returns nothing in the Some branch

Ah true, I forgot to return something else than the unit value. I adapted the contract and updated this branch. Will return a bool for Ok Result and Some Option.

Furthermore I removed the code related to the Mapping type. Afaik an ink message is not able to return a whole mapping only individual values or an array.

use-ink/ink#1762 (commits)

@peetzweg peetzweg merged commit 1c36dac into master May 19, 2023
@peetzweg peetzweg deleted the test/storage-types branch May 19, 2023 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants